﻿using EFCore.Entity;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace EFCore
{
    public class MyContext:DbContext
    {
        public MyContext(DbContextOptions<MyContext> options) : base(options)
        { }
        //public MyContext()
        //{ }
        //protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        //{
        //    optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog=MyRBAC;User ID=sa;Password=123;");
        //}
        public virtual DbSet<CodeUser> CodeUsers { get; set; }
        public virtual DbSet<CodeRole> CodeRoles { get; set; }
        public virtual DbSet<UserRole>  UserRoles { get; set; }
        public virtual DbSet<CodePermission>  CodePermissions { get; set; }
        public virtual DbSet<RolePermission>  RolePermissions { get; set; }
    }
}
